package com.qf.air.util;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient;

/**
 * @author 10537
 * @version V1.0
 * @Date 2021/11/4 10:39
 */

public class ElasticsearchUtil {

    private static final String HOST="192.168.11.11";
    private static final int PORT =9200;

    public static RestHighLevelClient getCline(){
        HttpHost host=new HttpHost(HOST,PORT);
        RestClientBuilder builder= RestClient.builder(host);
        RestHighLevelClient client=new RestHighLevelClient(builder);
        return client;
    }
}
